<style lang='less'>
.account-setting-vue {}

</style>
<template>
  <div class="account-setting-vue frame-page frame-flex-page h-panel">
    <div class="frame-left">
      <Menu :datas="menus" className="h-menu-white" @click="trigger" ref='menu'></Menu>
    </div>
    <div class="frame-main">
      <router-view></router-view>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      menus: [{
        title: '安全设置',
        name: 'security',
        key: 'security'
      }, {
        title: '通知设置',
        name: 'notice',
        key: 'notice'
      }]
    };
  },
  mounted() {
    this.menuSelect();
  },
  watch: {
    $route() {
      this.menuSelect();
    }
  },
  methods: {
    menuSelect() {
      if (this.$route.name) {
        this.$refs.menu.select(this.$route.name);
      }
    },
    trigger(data) {
      this.$router.push({ name: data.key });
    }
  },
  computed: {

  }
};

</script>
